package com.ty.springbootmybatisplusdruid;

import com.ty.springbootmybatisplusdruid.mapper.NewsMapper;
import com.ty.springbootmybatisplusdruid.pojo.News;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

/**
 * NewsMapperTester
 *
 * @aurhor Administrator  whs
 * @since 2024/9/10
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class NewsMapperTester {

    @Resource
    private NewsMapper newsMapper;


    @Test
    public void testNewsFindAll() {
        List<News> list = newsMapper.selectList(null);
        for (News news : list) {
            System.out.println(news);
        }
    }

}
